namespace chatroom{
        class  DBFactory{
        static std::shared_ptr<odb::core::database> create(const std::string& user,
            const std::string &pswd,
            const std::string &host,
            const std::string &db,
            const std::string &cset,
            int port,
            int conn_pool_count)
        {
            //初始化连接池
            std::unique_ptr<odb::mysql::connection_factory> pool(new odb::mysql::connection_pool_factory(conn_pool_count,0));
            std::shared_ptr<odb::core::database> db = std::make_shared(user, pswd,db, host, port, "", cset, 0, std::move(pool));
            return db;
        }
    };
}